//
// Created by masaikk on 2021/4/30.
//

#ifndef CT_STA1_H
#define CT_STA1_H

#include <stack>
#include <iostream>
using namespace std;

class Sta1{
private:
    stack<int> myStack;
public:
    void addElem(){
        this->myStack.push(0);
        this->myStack.push(1);
        this->myStack.push(2);
        this->myStack.push(3);
        this->myStack.push(4);
        this->myStack.push(5);

    };

    void cleanAll(){
        while(!this->myStack.empty()){
            this->myStack.pop();
        };
    };

    void showPopAll(){
        while(!this->myStack.empty()){
            printf("%d\n",this->myStack.top());
            this->myStack.pop();
        };
    };

    void execute1(){
        this->addElem();
        this->showPopAll();
    };
};

#endif //CT_STA1_H
